package rkw.database.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Type;

import core.database.AbstractEntity;

@Entity
@Table(name = "vote")
public class Vote extends AbstractEntity {

	@Column(name = "vote")
	@Type(type = "text")
	private String vote;

	@ManyToOne
	@JoinColumn(name = "election")
	private Election election;
	
	@Column(name="send")
	private Boolean send = false;

	public Vote() {
		super();
	}

	public Vote(String vote, Election election) {
		super();
		this.vote = vote;
		this.election = election;
	}

	public String getVote() {
		return vote;
	}

	public void setVote(String vote) {
		this.vote = vote;
	}

	public Election getElection() {
		return election;
	}

	public void setElection(Election election) {
		this.election = election;
	}

	public Boolean getSend() {
		return send;
	}

	public void setSend(Boolean send) {
		this.send = send;
	}
}
